<template>
  <div>
      <Alert style="text-align:center;font-size:26px">
        欢&nbsp;迎&nbsp;来&nbsp;到&nbsp;后&nbsp;台&nbsp;管&nbsp;理&nbsp;系&nbsp;统
      </Alert>
      <Carousel autoplay v-model="value" :height="600">
          <CarouselItem v-for="(pic,key,index) in pics" v-bind:key="pic.id" >
              <div class="demo-carousel" ><img :src="pic" style="height:600px"></div>
          </CarouselItem>
      </Carousel>
  </div>
</template>

<script>
export default {
  data () {
    return {
        value: 0,
        pics:[]
    }
  },
  created(){
    this.getData()
  },
  methods:{
    getData(){
      
      this.$http({
        url:'http://localhost:3000/upload/list',
        method:'get',
        data:{}
      }).then(res=>{

        for(var i=0;i<res.data.rows.length;i++){
          this.pics.push(res.data.rows[i].picurl)
        }
        
      })
    }
  }
}
</script>

<style>
  .ivu-carousel{
    width:1000px;
    height:600px;
    margin:20px auto
  }
</style>
